From 24415a6ffb1183bbc55aad6ba365c96f96ee10d5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Sat, 18 Sep 2021 13:08:46 +0200 Subject: [PATCH] cssimageurl: Explicitly check for local_error != NULL This should always be the case since gdk_texture_new_from_file should always set the error when it returns NULL, but make it explicit anyway. --- gtk/gtkcssimageurl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtkcssimageurl.c b/gtk/gtkcssimageurl.c index 15d56ac21e..8c9253744b 100644 --- a/gtk/gtkcssimageurl.c +++ b/gtk/gtkcssimageurl.c @@ -59,7 +59,7 @@ gtk_css_image_url_load_image (GtkCssImageUrl *url, if (texture == NULL) { - if (error) + if (error && local_error) { char *uri; @@ -70,7 +70,7 @@ gtk_css_image_url_load_image (GtkCssImageUrl *url, "Error loading image '%s': %s", uri, local_error->message); g_free (uri); } - + url->loaded_image = gtk_css_image_invalid_new (); } else -- 2.30.2